package com.meida.module.bus.provider.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.module.bus.client.entity.BusOrderAnswer;
import com.meida.common.mybatis.base.mapper.SuperMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 解答表 Mapper 接口
 *
 * @author flyme
 * @date 2021-08-03
 */
@Mapper
public interface BusOrderAnswerMapper extends SuperMapper<BusOrderAnswer> {

    /**
     * 统计某学霸答题次数
     *
     * @param var1
     * @return
     */
    @Select({"select count(*) from ${ew.tableName} as ${ew.tableAlias} ${ew.joinSql} ${ew.customSqlSegment}"})
    Integer countNumByAnswerUserId(@Param("ew") Wrapper<?> var1);
}
